﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ZebraCoreLib.Framework;
using System.Data.Linq.Mapping;
using ZebraCoreLib.ZebraException;
using ZebraCoreLib.BasBiz;
using System.Data.Common;
using ZebraCoreLib.Logistics;

namespace ZebraCoreLib.Goods
{
    [ZebraBizObject(TableName = "wms_goods")]
    public class Goods : BasBizService<Goods>
    {
        [ZebraField(Title = "编号", DataField = "goodsID", IsPrimaryKey = true, IsAutoID = true, IsRequired = true)]
        public string GoodsID { get; set; }

        [ZebraField(Title = "SKU", DataField = "SKU", IsRequired = true, SortOrder = true, SortByDesc = true)]
        public string SKU { get; set; }

        [ZebraField(Title = "客户编号", DataField = "sucode", IsRequired = true)]
        public string Sucode { get; set; }

        [ZebraField(Title = "型号/规格", DataField = "spec", IsRequired = true)]
        public string Spec { get; set; }

        [ZebraField(Title = "商品名称", DataField = "name", IsRequired = true)]
        public string Name { get; set; }

        [ZebraField(Title = "重量", DataField = "weight", IsRequired = true)]
        public double Weight { get; set; }

        [ZebraField(Title = "商品图片1", DataField = "pic1", IsRequired = true)]
        public string Pic1 { get; set; }

        [ZebraField(Title = "商品图片2", DataField = "pic2", IsRequired = true)]
        public string Pic2 { get; set; }

        [ZebraField(Title = "计量单位", DataField = "unit", IsRequired = true)]
        public string Unit { get; set; }

        [ZebraField(Title = "颜色", DataField = "color", IsRequired = true)]
        public string Color { get; set; }

        [ZebraField(Title = "类别ID", DataField = "goodsTypeID", IsRequired = true)]
        public string GoodsTypeID { get; set; }

        [ZebraField(Title = "类别", Relationship = "goodsTypeID=goodsTypeID")]
        public GoodsType GoodsType { get; set; }
    }
}
